<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>包装类型</title>
	<script>
		function someOne() {
			this.name = "Peter";
		}

		someOne.prototype.name2 = "James";

		someOne.prototype.printName = function () {
			console.log(this.name);
		};

		var person1 = new someOne;
		person1.printName();
		//		console.log(someOne.hasOwnProperty('name'));//true
		//		console.log(someOne.hasOwnProperty('name2'));//false

		//		console.log(person1.constructor == someOne);//true
		//		console.log(person1.constructor == Object.prototype.constructor);//false
		//		console.log(Object.prototype.constructor);//function Object() { [native code] }


	</script>
</head>
<body>

</body>
</html>